var $1;
if ($1 = (opener.$ || parent.$)) {
	var style = $1("head").find("link[href$=style.css]").attr("href");
	$("head").find("link[href$=style.css]").attr("href", style);
}

$(function() {
	var entityId = $.getParam("info_id");
	if (!entityId) {
		var urlName = location.pathname;
		var arr = urlName.split("/");
		entityId = arr[arr.length - 1].replace("_", "").split(".")[0];
	}
	bindPage(entityId);
})

// 绑定页面数据（包括内容和列表）
function bindPage(entityId) {
	var url = "/news/" + entityId;
	$.get(url, function(json) {
		var data = json;
		data = data.result || [];
		var html = "";
		var title = data.title;
		document.title = title;
		var createDate = data.create_date;
		var content = data.content;
		html = html + "<h4 class='new_h4'>" + title + "</h4>";
		html += '<div class="new_time">' + createDate + '</div>';
		html += content;

		$("#content").html(html);
	});
}